cmake_minimum_required (VERSION 3.10)

project(example_zeromq)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(ZeroMQ QUIET)
if(ZeroMQ_FOUND)
    message(STATUS "build ${PROJECT_NAME}")
    aux_source_directory(. DIR_SRCS)
    add_executable(${PROJECT_NAME} ${DIR_SRCS})

    target_link_libraries(${PROJECT_NAME} pthread)
    target_link_libraries(${PROJECT_NAME} ${ZeroMQ_LIBRARY})
    target_link_libraries(${PROJECT_NAME} glog)
endif()